// @ts-ignore
import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
// @ts-ignore
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
// import Prism from 'vite-plugin-prismjs'
// @ts-ignore
import createEmojiPlugin from '@kangc/v-md-editor/lib/plugins/emoji/index'
// @ts-ignore
import createCopyCodePlugin from '@kangc/v-md-editor/lib/plugins/copy-code/index'
import '@kangc/v-md-editor/lib/plugins/copy-code/copy-code.css'
import '@kangc/v-md-editor/lib/plugins/emoji/emoji.css'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'
import type { App } from 'vue'

VueMarkdownEditor.use(vuepressTheme)

VueMarkdownEditor.use(createEmojiPlugin()).use(createCopyCodePlugin())

const installEditor = (app: App) => {
    app.use(VueMarkdownEditor)
}

export default installEditor
